/**
 * 1
 *  
 * @Author : Ruoyu Wang
 * @DateTime : 24-9-20 下午7:24
 */

#include <iostream>
#include <vector>
#include <algorithm>

using namespace std;

class Solution {
public:
    /**
     * 代码中的类名、方法名、参数名已经指定，请勿修改，直接返回方法规定的值即可
     *
     *
     * @param firstList int整型vector<vector<>>
     * @param secondList int整型vector<vector<>>
     * @return int整型vector<vector<>>
     */
    vector<vector<int>> findIntersection(vector<vector<int>> &firstList, vector<vector<int>> &secondList) {
        vector<vector<int>> res;
        for (int i = 0; i < firstList.size(); ++i) {
            for (int j = 0; j < secondList.size(); ++j) {
                int l = max(firstList[i][0], secondList[j][0]);
                int r = min(firstList[i][1], secondList[j][1]);
                if (l <= r) {
                    res.push_back({l, r});
                }
            }
        }
        return res;
    }
};

int main() {

    return 0;
}